import ajax from '../utils/ajax'

const btn =document.getElementById('btn')
const view = document.getElementById('view');

btn.onclick =(function(){
 ajax('get','/api/getdata',{
   a:1,b:2
})
 .then(result => {
   view.innerHTML = JSON.stringify(result);
 })
})
 
